package com.jiyinit.web.core.business.service;

import com.jiyinit.core.framework.base.paging.PagingResult;
import com.jiyinit.web.core.business.dao.TabCoreOrgDao;
import com.jiyinit.web.core.business.dao.TabLoginUserDao;
import com.jiyinit.web.core.business.dto.OrgPageRequest;
import com.jiyinit.web.core.business.entity.TabCoreOrgEntity;
import com.jiyinit.web.core.business.entity.TabLoginInfoEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 部门管理service
 *
 * @author zhaolaiwei
 * @version 1.0
 * @date 2017/4/18 9:33
 * @since 1.0
 */
@Service("login.loginInfoServiceImpl")
public class LoginInfoServiceImpl {

    @Resource(name = "login.tabLoginUserDao")
    private TabLoginUserDao tabLoginUserDao;

    public int delete(Integer userId) {
        return tabLoginUserDao.logout(userId);
    }

    public TabLoginInfoEntity getInfoByUserId(Integer userId){
        return tabLoginUserDao.getLoginInfoByUserId(userId);
    }

    public int insert(TabLoginInfoEntity info){
        return tabLoginUserDao.insert(info);
    }

    public int update(TabLoginInfoEntity info){
        return tabLoginUserDao.update(info);
    }
}
